/**
 * Selling Partner API for Replenishment
 * The Selling Partner API for Replenishment (Replenishment API) provides programmatic access to replenishment program metrics and offers. These programs provide recurring delivery of any replenishable item at a frequency chosen by the customer.  The Replenishment API is available worldwide wherever Amazon Subscribe & Save is available or is supported. The API is available to vendors and FBA selling partners.
 *
 * The version of the OpenAPI document: 2022-11-07
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 *
 */

import { ApiClient } from '../ApiClient.js'
import { ListOfferMetricsRequestFilters } from './ListOfferMetricsRequestFilters.js'
import { ListOfferMetricsRequestPagination } from './ListOfferMetricsRequestPagination.js'
import { ListOfferMetricsRequestSort } from './ListOfferMetricsRequestSort.js'

/**
 * The ListOfferMetricsRequest model module.
 * @module replenishment_v2022_11_07/model/ListOfferMetricsRequest
 * @version 2022-11-07
 */
export class ListOfferMetricsRequest {
  /**
   * Constructs a new <code>ListOfferMetricsRequest</code>.
   * The request body for the &#x60;listOfferMetrics&#x60; operation.
   * @alias module:replenishment_v2022_11_07/model/ListOfferMetricsRequest
   * @class
   * @param pagination {ListOfferMetricsRequestPagination}
   * @param filters {ListOfferMetricsRequestFilters}
   */
  constructor (pagination, filters) {
    this.pagination = pagination
    this.filters = filters
  }

  /**
   * Constructs a <code>ListOfferMetricsRequest</code> from a plain JavaScript object, optionally creating a new instance.
   * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
   * @param {Object} data The plain JavaScript object bearing properties of interest.
   * @param {ListOfferMetricsRequest} obj Optional instance to populate.
   * @return {ListOfferMetricsRequest} The populated <code>ListOfferMetricsRequest</code> instance.
   */
  static constructFromObject (data, obj) {
    if (data) {
      switch (typeof data) {
        case 'string':
          obj = String(data)
          break
        case 'number':
          obj = Number(data)
          break
        case 'boolean':
          obj = Boolean(data)
          break
      }
      obj = obj || new ListOfferMetricsRequest()
      if (data.hasOwnProperty('pagination')) { obj.pagination = ListOfferMetricsRequestPagination.constructFromObject(data.pagination) }
      if (data.hasOwnProperty('sort')) { obj.sort = ListOfferMetricsRequestSort.constructFromObject(data.sort) }
      if (data.hasOwnProperty('filters')) { obj.filters = ListOfferMetricsRequestFilters.constructFromObject(data.filters) }
    }
    return obj
  }
}

/**
 * @member {ListOfferMetricsRequestPagination} pagination
 * @type {ListOfferMetricsRequestPagination}
 */
ListOfferMetricsRequest.prototype.pagination = undefined

/**
 * @member {ListOfferMetricsRequestSort} sort
 * @type {ListOfferMetricsRequestSort}
 */
ListOfferMetricsRequest.prototype.sort = undefined

/**
 * @member {ListOfferMetricsRequestFilters} filters
 * @type {ListOfferMetricsRequestFilters}
 */
ListOfferMetricsRequest.prototype.filters = undefined
